package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 订单服务远程调用
 *
 * @author LaiSanShan
 */
@FeignClient("gulimall-order")
public interface OrderFeignService {

    /**
     * 根据订单号查询订单
     */
    @GetMapping("/order/order/status/{orderSn}")
    public R queryStatusByOrderSn(@PathVariable("orderSn") String orderSn);

    /**
     * 关闭订单
     */
    @GetMapping("/order/order/close/{orderSn}")
    public R closeByOrderSn(@PathVariable("orderSn") String orderSn);

}
